package zeepos.mongo.impl;

import org.bson.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.stereotype.Repository;

import com.mongodb.client.MongoCursor;

import zeepos.mongo.MongoSolrData;

@Repository
public class MongoSolrDataImpl implements MongoSolrData {
	@Autowired
	private MongoOperations mongoTemplate;

	public MongoCursor<Document> getAllDate(String collectionName) {
		MongoCursor<Document> cursor = mongoTemplate.getCollection(collectionName).find().iterator();
		return cursor;
	}
}
